//
//  DDClientInfo.m
//  PrivateCloud
//
//  Created by mars on 13-10-18.
//  Copyright (c) 2013年 sarah doo. All rights reserved.
//

#import "DDClientInfo.h"

@implementation DDClientInfo


-(NSString *) getCloudId{
    NSUserDefaults* userDefaults = [[NSUserDefaults alloc]init];
    NSString* cloudId = [userDefaults stringForKey:@"CLOUD_ID"];
    if(cloudId == nil){
        CFUUIDRef uuidObject = CFUUIDCreate(kCFAllocatorDefault);
        NSString *uuidStr = (NSString *)CFUUIDCreateString(kCFAllocatorDefault, uuidObject);
        cloudId = uuidStr;
        [userDefaults setObject:uuidStr forKey:@"CLOUD_ID"];
        [userDefaults synchronize];
    }
    return cloudId;
}

-(NSString *) getcloudName
{
    NSUserDefaults* userDefaults = [[NSUserDefaults alloc]init];
    NSString* cloudName = [userDefaults stringForKey:@"CLOUD_NAME"];
    if(cloudName == nil){
        cloudName = @"iPhone";
    }
    return cloudName;
}

-(NSString *) cloudType{
    return  @"IOS";
}
@end
